package com.ggs.starbug;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.Arrays;

@SpringBootApplication
public class CloudDiskGatewayApplication {

//    public static boolean isPalindrome(int x) {
//        String s = String.valueOf(x);
//        String[] split = s.split("");
//        int length = split.length;
//        boolean flag = true;
//        for (int i = 0; i < length / 2; i++) {
//            if (!split[i].equals(split[length - i - 1])) {
//                flag = false;
//                break;
//            }
//        }
//        return flag;
//    }

/*    public static boolean isPalindrome(int x) {
        if (x == 0) return true;
        if (x < 0 || x % 10 == 0) return false;
        int reversed = 0;
        *//**
         * 12345
         * 5    1234
         * 54   123
         * 543  12
         *
         * 12321
         * 1    1232
         * 12   123
         * 123  12
         *
         * 123321
         * 1    12332
         * 12   1233
         * 123  123
         *//*
        while (x > reversed) {
            reversed = reversed * 10 + x % 10;
            x /= 10;
        }
        int[] k = new int[]{1, 2};
        return x == reversed || x == reversed / 10;
    }*/

//    public static void main(String[] args) {
//        System.out.println(isPalindrome(-121));
//    }

    public static void main(String[] args) {
        SpringApplication.run(CloudDiskGatewayApplication.class, args);
    }

}
